<template>
  <el-dialog :model-value="props.show" center width="60%" @close="onClose">
    <el-scrollbar height="43rem">
      <TermsOfUseContent />
    </el-scrollbar>
    <template #footer>
      <el-button type="primary" @click="onClose">确定</el-button>
    </template>
  </el-dialog>
</template>

<script setup>
import TermsOfUseContent from '@/views/common/TermsOfUseContent.vue'

const props = defineProps({
  show: {
    type: Boolean,
    default: false,
    required: true
  }
})
const emits = defineEmits(['close'])

/**
 * 关闭时调用父组件的事件
 */
function onClose() {
  emits('close')
}
</script>
